package com.example.cyk.mapper;

import com.example.cyk.model.Article;
import com.example.cyk.model.Board;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.security.auth.login.LoginContext;
import java.util.List;

@Mapper
public interface ArticleMapper {

    List<String> selectAllBoard();

    List<Article> selectArticleList(@Param("limit") Integer limit,
                                    @Param("offset") Integer offset);

    Integer getTotal();

    Integer getTotal(@Param("boardId") Long boardId);

    List<Article> selectArticleListByBoard(@Param("boardId") Long boardId,
                                           @Param("limit") int limit,
                                           @Param("offset") int offset);
    void add(Article article);

}
